import { AxiosServer } from "../utils/index.js";

// 课程信息接口
export const getShowArtive = async () => AxiosServer.get("/mtg/show");
// 关注/状态的修改-文章详情
export const getDetstatus = async (obj) =>
  AxiosServer.post("/mtg/detstatus", obj);
// 课程详情接口
export const getDetidsId = async (id) => AxiosServer.get(`/mtg/detids/${id}`);
// 详情页评论
export const getCommShow = async () => AxiosServer.get("/mtg/comm");

// 评论添加
export const getAddcom = async (obj) => AxiosServer.post("/mtg/addcom", obj);
// 评论添加删除
export const getDelcom = async (id) => AxiosServer.get("/mtg/delcom", id);
// 文章及课程搜索
export const getSearchcom = async (search) =>
  AxiosServer.get("/mtg/searchcom", search);
// 课程页面/zw
export const getCourse = async () => AxiosServer.get("/zw/course");

// 登录接口
export const getLogin = async (obj) => AxiosServer.post("/mtg/login",obj);
// ceshi
export const getReftoken = async () => AxiosServer.get("/mtg/tokencref");
// 刷新token
export const getRefresh = async (obj) => AxiosServer.post("/mtg/refresh",obj);